#include <ros/ros.h>
#include <std_msgs/String.h>

void sub_callback(std_msgs::String msg)
{
  // printf(" receive: %s \n", msg.data.c_str());
  ROS_INFO(msg.data.c_str());

}
void sub2_callback(std_msgs::String msg)
{
  ROS_WARN(msg.data.c_str());
}
int main(int argc, char *argv[])
{
  setlocale(LC_ALL, "");
  ros::init(argc, argv,  "sub_node");
  ros::NodeHandle nh;
  ros::Subscriber sub = nh.subscribe("publish_message_1", 10, sub_callback);
  ros::Subscriber sub2 = nh.subscribe("publish_message_2", 10, sub2_callback);
   while (ros::ok())
   {
     ros::spinOnce();
   }

    return 0;
}